<%@page import="kau.vo.AttendInfo"%>
<%@page import="kau.dao.CourseDAOImpl"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Insert title here</title>
<style type="text/css">
<!--
@import url("css/style.css");
-->
</style>

<script type="text/javascript">
	function dateCheck() {
		
		var startDate = document.getElementById("startDate").value.split("-");
		var endDate = document.getElementById("endDate").value.split("-");
		
		var dStartDate = new Date(startDate[0], startDate[1], startDate[2]).valueOf();
		var dEndDate = new Date(endDate[0], endDate[1], endDate[2]).valueOf();
		
		if(startDate==''){
			alert("시작일을 입력하세요");
			return false;
		}
		else if(endDate==''){
			alert("종료일을 입력하세요");
			return false;
		}
		else if (dStartDate > dEndDate) {
			alert("시작일이 종료일 보다 늦을수 없습니다.");
			return false;
		}
		else if (dStratTime > dEndTime) {
			alert("시작시간이 종료시간 보다 늦을수 없습니다.");
			return false;
		}
		else{
			return true;
		}
	}
</script>

<script type="text/javascript" language="javascript"
	src="/nems/admin/time/prototype-1.js"></script>
<script type="text/javascript" language="javascript"
	src="/nems/admin/time/prototype-base-extensions.js"></script>
<script type="text/javascript" language="javascript"
	src="/nems/admin/time/prototype-date-extensions.js"></script>
<script type="text/javascript" language="javascript"
	src="/nems/admin/time/behaviour.js"></script>
<script type="text/javascript" language="javascript"
	src="/nems/admin/time/datepicker.js"></script>
<link rel="stylesheet" href="/nems/admin/time/datepicker.css" />
<script type="text/javascript" language="javascript"
	src="/nems/admin/time/behaviors.js"></script>

</head>
<body>
	<form action="/nems/periodicalAttendInfoExcelDown.attendInfo" id="fn"
		name="fn" method="post">
		<input type="hidden" name="courseId" value="${sessionScope.courseId }"/>
		<h4
			style="font-family: 나눔고딕, serif; font-weight: bold; color: highlight; text-decoration: underline; text-align: left; padding-left: 50px; font-size: 20px;">
			기간 설정</h4>
		<hr>
		<br /> <br />
		<table width="600" border="0">

			<tr align="left">
				<td width="300" height="30">시작일</td>
				<td width="300">
					<div>
						<input class="datepicker" placeholder="날짜 입력" name="startDate"
							id="startDate" style="height: 20px; width: 185px" readonly />

					</div>
				</td>
				<td></td>


			</tr>

			<tr align="left">
				<td width="300" height="30">종료일</td>
				<td width="300">
					<div>
						<input class="datepicker" name="endDate" id="endDate"
							placeholder="날짜 입력" style="height: 20px; width: 185px" readonly />

					</div>
				</td>
			</tr>
		</table>


		<br> <br>
		<center>

			<button class="positive" style="width: 70px" onclick="return dateCheck()" type="submit">
				<img src="/nems/cust/img/shopping_cart_accept.png"
					style="width: 20px; height: 10px" />확인
			</button>
			&nbsp;
			<button class="negative" style="width: 70px"
				onclick="javascript:history.go(-1)">
				<img src="/nems/cust/img/delete.png" style="width: 20px; height: 10px" />취소
			</button>

		</center>
	</form>
</body>
</html>